package com.atguigu.tingshu.search.service.impl;

import com.atguigu.tingshu.search.service.ItemService;
import com.atguigu.tingshu.search.service.MqOpsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MqOpsServiceImpl implements MqOpsService {


    @Autowired
    private ItemService itemService;
    @Override
    public int albumOnSale(Long albumId) {
        boolean b = itemService.albumOnSale(albumId);
        return b ? 1 : 0;
    }

    @Override
    public int albumOffSale(Long albumId) {
        boolean b = itemService.albumOffSale(albumId);
        return b ? 1 : 0;
    }
}
